home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / BIOS_UTL / BIOSDATA / BIOSDATA.PAS
Pascal/Delphi Source File  |  1989-08-06  |  4KB  |  118 lines

  1. {
  2.   This is a complete map of PC, XT, AT, PS/2 and EGA-installed data
  3.   areas between 0400h and 0500h in the low memory segment put into the
  4.   form of a Turbo Pascal 4/5/5.5 compatible unit.
  5.  
  6.   I found myself needing one or two of these absolute addresses from time
  7.   to time and got tired of looking them up. Using a record structure
  8.   declared as absolute variable relieves you of specifying the
  9.   individual addresses for each variable, providing that all the Resrved
  10.   areas are included too.
  11.  
  12.   I hope this saves all those Turbo Pascal programmers out there some time
  13.   and lets them get on with the creative side of the business. Enjoy!
  14.  
  15.   David Gwillim
  16.   159 Woodbury Road
  17.   Hicksville, NY 11801-3030
  18.   (516) 942-8697
  19.  
  20.   6 August 1989
  21.  
  22.   CREDITS:
  23.  
  24.   The absolute addresses for this unit came from "The Programmer's PC
  25.   Sourcebook" by Thom Hogan, published by Microsoft Press.
  26.   ISBN 1-55615-118-7. List price $24.95 USA.
  27.  
  28.   This book is very helpful (apart from a few inevitable) typos). I
  29.   consider it an essential purchase for any programmer who has to deal
  30.   with a PC at the hardware level.
  31.  
  32. }
  33.  
  34. unit Bios;
  35.  
  36. interface
  37.  
  38. var
  39.    BiosSeg : record
  40.       ComBase : array[1..4] of word;
  41.       LptBase : array[1..4] of word;
  42.       InstalledHardware : array[1..2] of byte;
  43.       POST_Status : byte;      { Convertible only }
  44.       MemorySize : word;
  45.       _RESERVED1 : word;
  46.       KeyboardControl : array[1..2] of byte;
  47.       AlternateKeypadEntry : byte;
  48.       KeyboardBufferHeadPtr : word; { points to first char in type-ahead buffer }
  49.       KeyboardBufferTailPtr : word; { points to last char in type-ahead buffer }
  50.       KeyboardBuffer : array[1..16] of word;
  51.       FloppyRecalStatus : byte;
  52.       FloppyMotorStatus : byte;
  53.       FloppyMotorOffCounter : byte;
  54.       FloppyPrevOpStatus : byte;
  55.       FloppyControllerStatus : array[1..7] of byte;
  56.       DisplayMode : byte;
  57.       NumberOfColumns : word;
  58.       RegenBufferLength : word;
  59.       RegenBufferAddress : word;
  60.       CursorPosition : array[1..8] of word;
  61.       CursorType : word;
  62.       CurrentDisplayPage : byte;
  63.       VideoControllerBaseAddress : word;
  64.       Current3x8Register : byte;
  65.       Current3x9Register : byte;
  66.       PointerToResetCode : pointer;  { PS/2 only - except model 30 }
  67.       _RESERVED2 : byte;
  68.       TimerCounter : longint;
  69.       TimerOverflowFlag : byte;  { non-zero means timer passed 24 hours }
  70.       BreakKeyState : byte;
  71.       ResetFlag : word;  { $1234=bypass mem test; $4321=preserve mem (PS/2) }
  72.                          { $5678=system supended (Convertible) }
  73.                          { $9ABC=manufacturing test (Convertible) }
  74.                          { $ABCD=system POST loop (Convertible only) }
  75.       FixedDiskPrevOpStatus : byte;
  76.       NumberOfFixedDrives : byte;
  77.       FixedDiskDriveControl : byte;   {XT only}
  78.       FixedDiskControllerPort : byte; {XT only}
  79.       LptTimeOut : array[1..4] of byte;  { [4] valid for PC, XT and AT only }
  80.       ComTimeOut : array[1..4] of byte;
  81.       KeyboardBufferStartOffsetPtr :word;
  82.       KeyboardBufferEndOffsetPtr :word;
  83.       VideoRows : byte;
  84.       CharacterHeight : word;  { bytes per character }
  85.       VideoControlStates : array[1..2] of byte;
  86.  
  87.       _RESERVED3 : word;
  88.       MediaControl : byte;
  89.       FixedDiskControllerStatus : byte; { AT, XT after 1/10/85, PS/2 only }
  90.       FixedDiskControllerErrorStatus : byte; { AT, XT after 1/10/85, PS/2 only }
  91.       FixedDiskInterruptControl : byte; { AT, XT after 1/10/85, PS/2 only }
  92.       _RESERVED4 : byte;
  93.       DriveMediaState : array[0..1] of byte;
  94.       _RESERVED5 : word;
  95.       DriveCurrentCylinder : array[0..1] of byte;
  96.       KeyboardModeState : byte;
  97.       KeyboardLEDflags : byte;
  98.       UserWaitCompleteFlagAddress : pointer;
  99.       UserWaitCount : longint;   { micro-seconds }
  100.       WaitActiveFlag : byte;
  101.       _RESERVED6 : array[1..7] of byte;
  102.       VideoParameterTable : pointer;          { EGA and PS/2 only }
  103.       DynamicSaveArea : pointer;              { EGA and PS/2 only }
  104.       AlphaModeAuxCharGenerator : pointer;    { EGA and PS/2 only }
  105.       GraphicsModeAuxCharGenerator : pointer; { EGA and PS/2 only }
  106.       SecondarySaveArea : pointer;            { PS/2 only (not Model 30) }
  107.       _RESERVED7 : array[1..4] of byte;
  108.       _RESERVED8 : array[1..64] of byte;
  109.       PrintScreenStatus : byte;
  110.    end absolute $0040:$0000;
  111.  
  112. implementation
  113.  
  114. end.
  115.  
  116.  
  117.  
  118.